home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / AEsubdivTemplate.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  4.6 KB  |  124 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. // Copyright (C) 1997-2001 Alias|Wavefront,
  18. // a division of Silicon Graphics Limited.
  19. //
  20. // The information in this file is provided for the exclusive use of the
  21. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  22. // and incorporate this code into other products for purposes authorized
  23. // by the Alias|Wavefront license agreement, without fee.
  24. //
  25. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  26. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  27. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  28. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  29. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  30. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  31. // PERFORMANCE OF THIS SOFTWARE.
  32. //
  33. //
  34. //    Alias|Wavefront Script File
  35. //
  36. //    Creation Date:    March 23, 1999
  37. //
  38. //
  39. //    Procedure Name:
  40. //    AErevolveTemplate
  41. //
  42. //    Description Name;
  43. //    Creates the attribute editor controls for the subdiv node
  44. //
  45. //    Input Value:
  46. //    nodeName
  47. //
  48. //    Output Value:
  49. //    None
  50. //
  51.  
  52. global proc AEsubdiv_formatCallback( string $nodeName )
  53. //
  54. // Description:
  55. //    Proc called when ($nodeName.format) attribute is 
  56. //    changed.  We want to dim out the Depth control when
  57. //    "format" is set to "Adaptive."
  58. {
  59.     int $dimDepth = false;
  60.  
  61.     if( `getAttr ( $nodeName + ".format" )` == 1 ) {
  62.         $dimDepth = true;
  63.     }
  64.  
  65.     editorTemplate -dimControl $nodeName "depth" $dimDepth;
  66. }
  67.  
  68.  
  69. global proc AEsubdivTemplate( string $nodeName )
  70. {
  71.     editorTemplate -beginScrollLayout;
  72.  
  73.     editorTemplate -beginLayout "Subdiv Component Display" -collapse true;
  74.         editorTemplate -label "Vertices" -addControl "dispVertices";
  75.         editorTemplate -label "Edges" -addControl "dispEdges";
  76.         editorTemplate -label "Faces" -addControl "dispFaces";
  77.         editorTemplate -label "UVs" -addControl "dispMaps";
  78.         editorTemplate -label "UV Borders" -addControl "dispUVBorder";
  79.         editorTemplate -label "Geometry" -addControl "dispGeometry";
  80.         editorTemplate -label "Level" -addControl "displayLevel";
  81.         editorTemplate -label "Filter" -addControl "displayFilter";
  82.     editorTemplate -endLayout;
  83.  
  84.     editorTemplate -beginLayout "Subdiv Surface Display" -collapse true;
  85.         editorTemplate -label "Resolution" -addControl "dispResolution";
  86.         editorTemplate -label "Normals scale" -addControl "normalsDisplayScale";
  87.     editorTemplate -endLayout;
  88.  
  89.     editorTemplate -beginLayout "Hierarchical Edit Behavior" -collapse true;
  90.         editorTemplate -addControl "scalingHierarchy";
  91.     editorTemplate -endLayout;
  92.  
  93.     editorTemplate -beginLayout "Tessellation";
  94.         editorTemplate -addControl "format" AEsubdiv_formatCallback;
  95.         editorTemplate -addControl "depth";
  96.         editorTemplate -addControl "sampleCount";
  97.     editorTemplate -endLayout;
  98.     // include/call base class/node attributes
  99.     AEsurfaceShapeTemplate $nodeName;
  100.  
  101.     //suppressed attributes
  102.     editorTemplate -suppress "create";
  103.     editorTemplate -suppress "cached";
  104.     editorTemplate -suppress "outSubdiv";
  105.     editorTemplate -suppress "worldSubdiv";
  106.     editorTemplate -suppress "vertex";
  107.     editorTemplate -suppress "singleVertex";
  108.     editorTemplate -suppress "singleVertexX";
  109.     editorTemplate -suppress "singleVertexY";
  110.     editorTemplate -suppress "singleVertexZ";
  111.     editorTemplate -suppress "edgeCrease";
  112.     editorTemplate -suppress "textureCoord";
  113.  
  114.     editorTemplate -suppress "baseFaceCount";
  115.     editorTemplate -suppress "levelOneFaceCount";
  116.     editorTemplate -suppress "dispVerticesAsLimitPoints";
  117.     editorTemplate -suppress "localizeLimitPointsEdit";
  118.     editorTemplate -suppress "dispCreases";
  119.     editorTemplate -suppress "vertexTweak";
  120.  
  121.     editorTemplate -addExtraControls;
  122.     editorTemplate -endScrollLayout;
  123. }
  124.